package cn.abyss.admin.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @author zhangsj
 * @date Created on 2021/8/26
 */
@Configuration
@MapperScan({"cn.abyss.admin.*.*.dao","cn.abyss.admin.*.dao"})
@ComponentScan({/*"cn.abyss.admin.*.*.service",*/"cn.abyss.admin.*.service"})
@ComponentScan({"cn.abyss.admin.lib"}) 		//对common和common-redis中的所有注解类扫描
@ComponentScan({/*"cn.abyss.admin.*.*.business",*/"cn.abyss.admin.*.business"})
// @ComponentScan({"cn.abyss.admin.identity.security"})
public class ScanConfig {
    private static final Logger logger = LoggerFactory.getLogger(ScanConfig.class);

    @Bean
    public PasswordEncoder passwordEncoder(){
        return new BCryptPasswordEncoder();
    }
}
